/**
 * 
 */
package com.curso.sesion11;

import java.text.DateFormat;
import java.text.NumberFormat;
import java.util.Date;
import java.util.Locale;

/**
 * @author MATEUS
 *
 */
public class FormatGame {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		double cantidad = 5465456132.25;
		double porcentaje = 0.8546971;
		
		Locale locColombia = new Locale("es", "co");
		Locale locUSA = new Locale("en", "us");
		Locale locGermany = new Locale("de", "de");
		Locale locFrance = new Locale("fr", "fr");
		
		NumberFormat nfColombia = NumberFormat.getNumberInstance(locColombia);
		NumberFormat nfUSA = NumberFormat.getNumberInstance(locUSA);
		NumberFormat nfGermany = NumberFormat.getNumberInstance(locGermany);
		NumberFormat nfFrance = NumberFormat.getNumberInstance(locFrance);
		
		System.out.println("nfColombia: " + nfColombia.format(cantidad));
		System.out.println("nfUSA: " + nfUSA.format(cantidad));
		System.out.println("nfGermany: " + nfGermany.format(cantidad));
		System.out.println("nfFrance: " + nfFrance.format(cantidad));
				
		nfColombia = NumberFormat.getCurrencyInstance(locColombia);
		nfUSA = NumberFormat.getCurrencyInstance(locUSA);
		nfGermany = NumberFormat.getCurrencyInstance(locGermany);
		nfFrance = NumberFormat.getCurrencyInstance(locFrance);
		
		System.out.println("nfColombia: " + nfColombia.format(cantidad));
		System.out.println("nfUSA: " + nfUSA.format(cantidad));
		System.out.println("nfGermany: " + nfGermany.format(cantidad));
		System.out.println("nfFrance: " + nfFrance.format(cantidad));
		
		nfColombia = NumberFormat.getPercentInstance(locColombia);
		nfUSA = NumberFormat.getPercentInstance(locUSA);
		nfGermany = NumberFormat.getPercentInstance(locGermany);
		nfFrance = NumberFormat.getPercentInstance(locFrance);
		
		System.out.println("nfColombia: " + nfColombia.format(porcentaje));
		System.out.println("nfUSA: " + nfUSA.format(porcentaje));
		System.out.println("nfGermany: " + nfGermany.format(porcentaje));
		System.out.println("nfFrance: " + nfFrance.format(porcentaje));
		
		
		DateFormat dfColombia = DateFormat.getDateInstance(DateFormat.MEDIUM, locColombia);
		DateFormat dfUSA = DateFormat.getDateInstance(DateFormat.MEDIUM, locUSA);
		DateFormat dfGermany = DateFormat.getDateInstance(DateFormat.MEDIUM, locGermany);
		DateFormat dfFrance = DateFormat.getDateInstance(DateFormat.MEDIUM, locFrance);
		
		Date hoy = new Date();
		
		System.out.println("dfColombia: " + dfColombia.format(hoy));
		System.out.println("dfUSA: " + dfUSA.format(hoy));
		System.out.println("dfGermany: " + dfGermany.format(hoy));
		System.out.println("dfFrance: " + dfFrance.format(hoy));
		
		dfColombia = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locColombia);
		dfUSA = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locUSA);
		dfGermany = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locGermany);
		dfFrance = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locFrance);
		
		System.out.println("dfColombia: " + dfColombia.format(hoy));
		System.out.println("dfUSA: " + dfUSA.format(hoy));
		System.out.println("dfGermany: " + dfGermany.format(hoy));
		System.out.println("dfFrance: " + dfFrance.format(hoy));
		
	}

}
